package hxm.monads;

/**
 * An IdentityMonad does not do anything to a value.
 * 
 * @author Simon Krajewski
 */

class IdentityMonad 
{
	static public function bind(a:Dynamic, f:Dynamic ->Dynamic):Dynamic
	{
		return f(a);
	}
	
	static public function map(a:Dynamic, f:Dynamic -> Dynamic):Dynamic
	{
		return f(a);
	}
	
	static public inline function yield<A>(a:A):A return a
}